<?php
class huongdan_model extends CI_Model
{
	function __construct(){
        parent::__construct();
	}
	
	function count_all()
	{      
		 $this->db->where('bl_active',1);
		 $query = $this->db->get('raovat');
		 return $query->num_rows();
	}
	
	function get_all($num=30, $offset=0)
	{
		$this->db->where('bl_active',1);
		$this->db->order_by('dt_create','DESC');
		$query = $this->db->get('raovat',$num,$offset);
		return $query->result();
	}


}
?>
